﻿using System;
using System.ComponentModel.DataAnnotations;

namespace K9Nano.Domain
{
    public interface IFullAudited: IModificationAudited, IDeletionAudited
    {

    }

    public class FullAuditedEntity<TKey> : Entity<TKey>, IFullAudited where TKey: IEquatable<TKey>
    {
        public virtual Guid? CreatorUserId { get; set; }
        [Required]
        public virtual DateTimeOffset CreationTime { get; set; }
        public virtual Guid? LastModifierUserId { get; set; }
        public virtual DateTimeOffset? LastModificationTime { get; set; }
        public virtual Guid? DeleterUserId { get; set; }
        public virtual DateTimeOffset? DeletionTime { get; set; }
        [Required]
        public virtual bool IsDeleted { get; set; }
    }

    public class FullAuditedEntity : FullAuditedEntity<long>
    {

    }
}